package com.AFH.test;

import android.graphics.Canvas;

public class Bomb extends Sprite {
	public Bomb(){
		speed=0;
		xPos = GameData.rnd.nextInt(7) * 80 + 20+ 80 ;
		yPos = GameData.rnd.nextInt(3) * 80 + 20+ 80 ;
		currentFrame=0;
		currentSegment=3;
		st=new SpriteThread(this);
	}
	@Override
	public void drawself(Canvas canvas){
		int ImgIndex = animationList.get(currentSegment)[currentFrame];
		BitmapManager.DrawGameUIResource(ImgIndex, canvas, xPos, yPos, null);
	}
	@Override
	public void nextframe(){
		int [] currSeg = animationList.get(currentSegment);
		if(currentSegment==3 && currentFrame==currSeg.length-1) {
			stopAnimation();
			return;
		}
		currentFrame = (currentFrame + 1)%currSeg.length;
		xPos=xPos-30;
		yPos=yPos-30;
	}

}
